package cn.livingCloud.entity.core;

import cn.livingCloud.utils.DateUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * 基类
 * Created by 唐旭 on 2016/5/26.
 */
public abstract class BaseEntity implements Serializable {
    protected Date createDateTime = DateUtils.now();
    protected Boolean archive = false;

    public Date getCreateDateTime() {
        return createDateTime;
    }

    public BaseEntity setCreateDateTime(Date createDateTime) {
        this.createDateTime = createDateTime;
        return this;
    }

    public Boolean getArchive() {
        return archive;
    }

    public BaseEntity setArchive(Boolean archive) {
        this.archive = archive;
        return this;
    }

    @Override
    public String toString() {
        return "BaseEntity{" +
                "archive=" + archive +
                ", createDateTime=" + createDateTime +
                '}';
    }
}
